<template>
<!--  <slot>
    <p>子组件默认的插槽数据</p>
  </slot>
  <h1>SubSlot插槽组件</h1>
  <p>我是子组件</p>-->

  <slot name="header">
    <div>slot默认的头</div>
  </slot>

  <p>我是子组件</p>

  <slot name="footer">
    <div>slot默认的脚</div>
  </slot>

</template>

<script>
  export default {
    name: "SubSlot",
    data(){
      return{
        msg: "只是子组件的msg数据"
      }
    }
  }
</script>

<style scoped>

</style>